# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.shortcuts import render, render_to_response
from django.http import HttpResponse
from app.models import User
#from app.forms import UserFom

# Create your views here.

# 模型测试
def testmodel(request):
    # 获取所有用户列表
    u = User.objects.all()
    for row in u:
        print(row.account)
        print(row.passwd)
        print(row.name)
        print(row.sex)
    return HttpResponse("app模型测试")

# 表单模型
#def formtest(request):
    ## 表单数据过滤
    #form_data = UserFom(request.POST)
    ## 验证表单数据
    #data_rs = forms.is_valid()
    #if data_rs:
        #return HttpResponse("aaa")
